Install both Imagemagick and node from this folder.

Put convertImages.js file within folder where you want to compress images

within folder open command prompt and run following command

node ./convertImages.js

script will create two folders converted and original and segregate your image files